package com.getword.domain;

import com.getword.mongo.annotations.GeneratedLongValue;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;


@Document(collection = "outline")
@Getter
@Setter
@ToString
public class Outline implements Serializable {
    @Id
    @Field("_id")
    @GeneratedLongValue
    private long id;

    private String name;
    @DBRef
    private Course course; // 大纲所属课程
    @DBRef
    private Grade grade;
    private Date uploadTime; //大纲上传时间

    @DBRef
    private User user;

    private String shuoming;
    private String refer;

    private List<Map<String, Object>> content;
    private String fileId;  // 数据库中大纲文件id
    private String filepath; // 大纲文件路径

    private Boolean status; // 审核状态 ,默认未审核
}
